﻿using System.ComponentModel.DataAnnotations;
namespace SklepISI.Core.Models
{
    public class UserModel
    {
        public int ID { get; set; }

        [Required]
        [Display(Name="Nazwa użytkownika")]
        public string Username { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Hasło")]
        [StringLength(100, ErrorMessage = "Długość hasła musi wynosić conajmniej 6 znaków.", MinimumLength = 6)]
        public string Password { get; set; }

        [Required]
        [Display(Name = "Imię")]
        public string FirstName { get; set; }

        [Required]
        [Display(Name = "Nazwisko")]
        public string LastName { get; set; }

         [Required]
         [Display(Name = "Adres")]
        public string Address { get; set; }

        [Required]
        [Display(Name = "Kod pocztowy")]
        public string PostalCode { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email")]
        [EmailAddress(ErrorMessage="Zły format emaila")]
        public string Email { get; set; }

        
        public RoleModel Role { get; set; }


        public int RoleId { get; set; }
    }
}